<?php if (!defined('THINK_PATH')) exit(); /*a:4:{s:69:"D:\zrhost\hzp\back\public/../application/admin/view/goods/update.html";i:1501050463;s:74:"D:\zrhost\hzp\back\public/../application/admin/view/public/headerbase.html";i:1500460707;s:68:"D:\zrhost\hzp\back\public/../application/admin/view/public/left.html";i:1500081818;s:70:"D:\zrhost\hzp\back\public/../application/admin/view/public/footer.html";i:1500081818;}*/ ?>
<!DOCTYPE html>
<html lang="zh-cn">

	<head>
		<meta charset="utf-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta name="viewport" content="width=device-width, initial-scale=1.0">
		<title>公众平台自助引擎-中微信通</title>
		<meta name="keywords" content="" />
		<meta name="description" content="一款免费开源的微信公众平台管理系统，是国内最完善移动网站及移动互联网技术解决方案。" />
		<link rel="shortcut icon" href="__PUBLIC__/favicon.ico" />
		<link href="__PUBLIC__/css/bootstrap.min.css" rel="stylesheet">
		<link href="__PUBLIC__/css/common.css" rel="stylesheet">
		<script type="text/javascript" src="__PUBLIC__/js/jquery-1.11.1.min.js"></script>
		<script type="text/javascript" src="__PUBLIC__/js/bootstrap.min.js"></script>
		<script type="text/javascript" src="__PUBLIC__/js/util.js"></script>
		<script type="text/javascript" src="__PUBLIC__/js/require.js"></script>
		<link rel="stylesheet" href="__PUBLIC__/zrUploads/control/css/zyUpload.css" type="text/css" />
   
    <!-- 引用核心层插件 -->
    <script type="text/javascript" src="__PUBLIC__/zrUploads/core/zyFile.js"></script>

    <!-- 引用控制层插件 -->
    <script type="text/javascript" src="__PUBLIC__/zrUploads/control/js/zyUpload.js"></script>
    <!-- 引用初始化JS -->
    <script type="text/javascript" src="__PUBLIC__/zrUploads/demo.js"></script>
    <script type="text/javascript" charset="utf-8" src="__PUBLIC__/ueditor/ueditor.config.js"></script>
    <script type="text/javascript" charset="utf-8" src="__PUBLIC__/ueditor/ueditor.all.min.js"> </script>
    <!--建议手动加在语言，避免在ie下有时因为加载语言失败导致编辑器加载失败-->
    <!--这里加载的语言文件会覆盖你在配置项目里添加的语言类型，比如你在配置项目里配置的是英文，这里加载的中文，那最后就是中文-->
    <script type="text/javascript" charset="utf-8" src="__PUBLIC__/ueditor/lang/zh-cn/zh-cn.js"></script>
		<style>
			.act{
				background-color: #428BCA;
			}
		</style>
	</head>

	<body data-skin="default" class=" ">
		<div class="loader" style="display:none">
			<div class="la-ball-clip-rotate">
				<div></div>
			</div>
		</div>
		<div class="head">
			<nav class="navbar navbar-default" role="navigation">
				<div class="container ">
					<div class="navbar-header">
						<a class="navbar-brand" href="http://localhost/upload/">
							<img src="__PUBLIC__/images/logo.png" class="pull-left" width="110px" height="35px">
							<span class="version">1.0.0</span>
						</a>
					</div>
					<div class="collapse navbar-collapse">
						<ul class="nav navbar-nav navbar-left">
							<li class="active">
								<a href="<?php echo url('Index/index'); ?>">系统管理</a>
							</li>
						</ul>
						<ul class="nav navbar-nav navbar-right">
							<li class="dropdown">
								<a href="javascript:;" class="dropdown-toggle" data-toggle="dropdown"><i class="wi wi-user color-gray"></i><?php echo session('username'); ?><span class="caret"></span></a>
								<ul class="dropdown-menu color-gray" role="menu">
									<li>
										<a href="<?php echo url('Index/index'); ?>" target="_blank"><i class="wi wi-account color-gray"></i> 我的账号</a>
									</li>
									<li class="divider"></li>
									<li>
										<a href="<?php echo url('Login/loginout'); ?>"><i class="fa fa-sign-out color-gray"></i> 退出系统</a>
									</li>
								</ul>
							</li>
						</ul>
					</div>
				</div>
			</nav>
		</div>
		<div class="main">
			<div class="container">
				<div class="panel panel-content main-panel-content ">
					<div class="content-head panel-heading main-panel-heading">
						<span class="font-lg"><i class="wi wi-setting"></i> 系统管理</span>
					</div>
					<div class="panel-body clearfix main-panel-body "> <div class="left-menu">
	<div class="left-menu-content">
		<div class="left-menu-top skin-black">

			<div class="font-lg title-setting"><i class="wi wi-setting"></i> 系统管理</div>
		</div>
		<div class="panel panel-menu">
			<div class="panel-heading">
				<span class="no-collapse">帐户/用户<i class="wi wi-appsetting pull-right setting"></i></span>
				<span class="" data-toggle="collapse" data-target="#frame-user" onclick="util.cookie.set('menu_fold_tag:user', util.cookie.get('menu_fold_tag:user') == 1 ? 0 : 1)">帐户/用户<i class="wi wi-down-sign-s pull-right"></i></span>
			</div>

			<ul class="list-group collapse in" id="frame-user">
				<li class="list-group-item <?php if($a == 'Index'): ?>act<?php endif; ?>">
					<a href="<?php echo url('Index/index'); ?>" class="text-over">
						<i class="wi wi-account"></i> 我的帐户 </a>
				</li>
			</ul>
		</div>
		<div class="panel panel-menu">
			<div class="panel-heading">
				<span class="no-collapse">菜单列表<i class="wi wi-appsetting pull-right setting"></i></span>
			</div>

			<ul class="list-group collapse in" id="frame-wxplatform">
				<li class="list-group-item <?php if($a == 'Banner'): ?>act<?php endif; ?>">
					<a href="<?php echo url('Banner/index'); ?>" class="text-over">
						<i class="fa fa-photo"></i> 首页轮播图 </a>
				</li>
				<li class="list-group-item <?php if($a == 'Cate'): ?>act<?php endif; ?>">
					<a href="<?php echo url('Cate/index'); ?>" class="text-over">
						<i class="wi wi-notice"></i> 商品分类 </a>
				</li>
				<!-- <li class="list-group-item <?php if($a == 'Coupon'): ?>act<?php endif; ?>">
					<a href="<?php echo url('Coupon/index'); ?>" class="text-over">
						<i class="wi wi-message"></i> 优惠券管理 </a>
				</li> -->
				<li class="list-group-item <?php if($a == 'Brand'): ?>act<?php endif; ?>">
					<a href="<?php echo url('Brand/index'); ?>" class="text-over">
						<i class="wi wi-notice"></i> 品牌管理 </a>
				</li>
				<li class="list-group-item <?php if($a == 'Goods'): ?>act<?php endif; ?>">
					<a href="<?php echo url('Goods/index'); ?>" class="text-over">
						<i class="wi wi-template"></i> 商品管理 </a>
				</li>
				<li class="list-group-item <?php if($a == 'Orders'): ?>act<?php endif; ?>">
					<a href="<?php echo url('Orders/index'); ?>" class="text-over">
						<i class="wi wi-registersite"></i> 订单管理 </a>
				</li>
				<li class="list-group-item <?php if($a == 'User'): ?>act<?php endif; ?>">
					<a href="<?php echo url('User/index'); ?>" class="text-over">
						<i class="wi wi-template"></i> 用户管理 </a>
				</li>
			</ul>
		</div>
	</div>
</div>
<script src="__PUBLIC__/ppy/js/jquery.min.js" type="text/javascript"></script>
<script src="__PUBLIC__/ppy/js/bootstrap.min.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="__PUBLIC__/ppy/css/bootstrap.min.css">
<link href="__PUBLIC__/ppy/css/fileinput.css" media="all" rel="stylesheet" type="text/css" />
<script src="__PUBLIC__/ppy/js/fileinput.js" type="text/javascript"></script>
<script src="__PUBLIC__/ppy/js/fileinput_locale_zh.js" type="text/javascript"></script>
<div class="right-content">
	<ol class="breadcrumb we7-breadcrumb">
		<li>
			<a href="<?php echo url('Brand/index'); ?>">品牌介绍</a>
		</li>
		<li>
			编辑信息
		</li>
	</ol>
	<div class="clearfix">

		<form action="<?php echo url('Goods/saveGoods'); ?>" method="post" class="we7-form" role="form" id="form1" enctype="multipart/form-data">
			<div class="form-group">
				<label class="col-sm-2 control-label">商品展示图</label>
				<label style="float: right">
					<span class="btn btn-minier btn-success"  data-toggle="modal" data-target="#myModal">查看已上传的图片</span>
				</label>
				
				<input id="file-5" name="pic_all[]" type="file" class="file"  multiple data-preview-file-type="any" data-upload-url="#" data-preview-file-icon=""><br />	
				
			</div>
			<input name="pic_oldlist" type="hidden" id="pic_oldlist" type="text" size="130" value="<?php echo $data['goodshow']; ?>" >
			<div class="form-group">
				<label class="col-sm-2 control-label">商品缩略图</label>
				<div class="col-sm-8">
				<input type="file" name="goodsthumb" id="file1" multiple="multiple" style="display: inline-block;"/>
				<span style="color: red">*图片尺寸220*220</span>
				<br>
				<img src="<?php echo $data['goodsthumb']; ?>" id="img1" style="height:100px;">
				<input type="hidden" name="goodsthumb" value="<?php echo $data['goodsthumb']; ?>"/>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 control-label">商品标题</label>
				<div class="col-sm-8">
					<input type="text" class="form-control" name="gtitle" id="gtitle" value="<?php echo $data['gtitle']; ?>" placeholder="商品标题" />
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 control-label">商品品牌</label>
				<div class="col-sm-8">
					<select name="gbrand" class="form-control">
						<option value="0">==请选择商品品牌==</option>
						<?php if(is_array($brand) || $brand instanceof \think\Collection || $brand instanceof \think\Paginator): if( count($brand)==0 ) : echo "" ;else: foreach($brand as $key=>$vo): ?>
							<option value="<?php echo $vo['bid']; ?>" <?php if($vo['bid'] == $data['gbrand']): ?>selected<?php endif; ?>><?php echo $vo['bname']; ?></option>
						<?php endforeach; endif; else: echo "" ;endif; ?>
					</select>	
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 control-label">商品类别</label>
				<div class="col-sm-8">
					<select name="gcate" class="form-control">
						<option value="0">==请选择商品类别==</option>
						<?php if(is_array($category) || $category instanceof \think\Collection || $category instanceof \think\Paginator): if( count($category)==0 ) : echo "" ;else: foreach($category as $key=>$vo): ?>
							<option value="<?php echo $vo['cid']; ?>" <?php if($vo['cid'] == $data['gcate']): ?>selected<?php endif; ?>><?php echo $vo['cname']; ?></option>
						<?php endforeach; endif; else: echo "" ;endif; ?>
					</select>	
				</div>
			</div>
			<!-- <div class="form-group">
				<label class="col-sm-2 control-label">最低价</label>
				<div class="col-sm-8">
					<input type="text" class="form-control" name="glowerprice" id="glowerprice" value="<?php echo $data['glowerprice']; ?>" placeholder="最低价" />
				</div>
			</div> -->
			<div class="form-group">
				<label class="col-sm-2 control-label">库存</label>
				<div class="col-sm-8">
					<input type="text" class="form-control" name="goodsnum" id="goodsnum" value="<?php echo $data['goodsnum']; ?>" placeholder="库存" />
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 control-label">运费</label>
				<div class="col-sm-8">
					<input type="text" class="form-control" name="gfare" id="gfare" value="<?php echo $data['gfare']; ?>" placeholder="运费" />
				</div>
			</div>
				<?php if(is_array($specs) || $specs instanceof \think\Collection || $specs instanceof \think\Paginator): if( count($specs)==0 ) : echo "" ;else: foreach($specs as $key=>$va): ?>
				<div id="tpl" style="clear:both;">
					<div class="form-group" style="width:31%;float:left">
						<label class="col-xs-12 col-sm-2 col-md-2 control-label" style="width:59%;;">商品规格</label>
						<div class="col-sm-8" style="width:40%;margin:0;padding:0;">
							<input type="text" class="form-control" name="sspec[]" id="sspec" vlaue="" value="<?php echo $va['sspec']; ?>" placeholder="商品规格"/>
						</div>
					</div>
					<div class="form-group" style="width:23%;float:left;padding:0;margin-left:2%;">
						<label class="col-xs-12 col-sm-2 col-md-2 control-label" style="width:18%;margin:0;">价格</label>
						<div class="col-sm-8" style="width:60%;margin:0;padding:0;">
							<input type="text" class="form-control" name="sprice[]" id="sprice" vlaue="" value="<?php echo $va['sprice']; ?>" placeholder="每一个规格价格"/>
						</div>
					</div>
					<div class="form-group" style="width:25%;float:left;padding:0;margin:0;">
						<label class="col-xs-12 col-sm-2 col-md-2 control-label" style="width:28%;margin:0;">规格数量</label>
						<div class="col-sm-8" style="width:55%;margin:0;padding:0;">
							<input type="text" class="form-control" name="snum[]" id="snum" vlaue="" value="<?php echo $va['snum']; ?>" placeholder="每一个规格数量"/>
						</div>
					</div>
					<div class="tu" style="width:3%;float:left;">
						<img src="/static/images/del.png" alt="" style="width:100%;margin-top:7px;" onclick="delect(this,<?php echo $va['sid']; ?>)">
					</div>
					<hr/  style="clear:both;width:85%;margin-left:0;">
				</div>
				<input type="hidden" name="sid[]" value="<?php echo $va['sid']; ?>" />
				<?php endforeach; endif; else: echo "" ;endif; ?>
				<div id="container"></div>
				<div class="form-group">
					<label class="col-sm-2 control-label"></label>
					<div class="col-sm-8">
						<a href="javascript:;" id="category-add"><i class="fa fa-plus-circle"></i> 继续添加规格</a>
					</div>
				</div>
			
			
			<div class="form-group">
   				
   				<div class="col-sm-2 control-label" >商品详情
   				<div style="display: block;color:red">图片尺寸750*425</div>
   				</div>
   				<div class="col-sm-8">
   				 	<script id="editor" type="text/plain" style="width:750px;height:400px;"></script>
   				</div>
   				<textarea style="display: none"  id="goodstext" ><?php echo $data['goodstext']; ?></textarea>>
			</div>
			<div class="form-group">
				<div class="">
					<input type="submit" class="btn btn-primary" value="提交" />
					<input type="hidden" name="gid" value="<?php echo $data['gid']; ?>" />
					<a href="<?php echo url('Brand/index'); ?>"><button type="button" class="btn btn-success">取消</button>
				</div>
			</div>

		</form>



	</div>
	  <!-- 显示模态框（Modal） -->
        <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
            <div class="modal-dialog" style="width:80%">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal"
                                aria-hidden="true">×
                        </button>
                        <h4 class="modal-title" id="myModalLabel">
                            操作已上传的多图
                        </h4>
                    </div>
                    <div class="modal-body">
                        <div class="row">
                            <div class="col-xs-12">


                                <div class="form-group">
                                    <div class="col-sm-10">
                                        <ul>
                                            <?php if(is_array($goodshow) || $goodshow instanceof \think\Collection || $goodshow instanceof \think\Paginator): $i = 0; $__LIST__ = $goodshow;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$v): $mod = ($i % 2 );++$i;?>

                                                <div class="file-preview-frame" data-fileindex="0" id="id<?php echo $i; ?>">
                                                    <img src="<?php echo get_imgurl($v); ?>" class="file-preview-image" style="width:auto;height:160px;">
                                                    <div class="file-thumbnail-footer">
                                                        <div class="file-actions">
                                                            <div class="file-footer-buttons">
                                                                <a class="red" href="javascript:;" onclick="return delall(<?php echo $i; ?>,'<?php echo $v; ?>');" title="回收站">
                                                                    <i class="ace-icon fa fa-trash-o bigger-130"></i>
                                                                </a>
                                                            </div>
                                                            <div class="clearfix"></div>
                                                        </div>
                                                    </div>
                                                </div>
                                            <?php endforeach; endif; else: echo "" ;endif; ?>
                                        </ul>
                                    </div>
                                </div>

                                <div class="space-4"></div>
                            </div>
                        </div>
                    </div>
                    <div class="modal-footer">
                        <button class="btn btn-primary">
                            若想取消修改，请刷新当前页面
                        </button>
                        <button type="button" class="btn btn-default" data-dismiss="modal">
                            关闭
                        </button>
                    </div>
                </div><!-- /.modal-content -->
            </div><!-- /.modal-dialog -->
        </div><!-- /.modal -->
	<script>
		$(function(){
			$('#category-add').click(function(){
				//var div=$("<div></div>")
				var html = $('<div><div style="clear:both;"><div class="form-group" style="width:31%;float:left"><label class="col-xs-12 col-sm-2 col-md-2 control-label" style="width:59%;;">商品规格</label><div class="col-sm-8" style="width:40%;margin:0;padding:0;"><input type="text" class="form-control" name="sspec[]" id="sspec" vlaue="" value="" placeholder="商品规格"/></div></div><div class="form-group" style="width:23%;float:left;padding:0;margin-left:2%;"><label class="col-xs-12 col-sm-2 col-md-2 control-label" style="width:18%;margin:0;">价格</label><div class="col-sm-8" style="width:60%;margin:0;padding:0;"><input type="text" class="form-control" name="sprice[]" id="sprice" vlaue="" value="" placeholder="每一个规格价格"/></div></div><div class="form-group" style="width:25%;float:left;padding:0;margin:0;"><label class="col-xs-12 col-sm-2 col-md-2 control-label" style="width:28%;margin:0;">规格数量</label><div class="col-sm-8" style="width:55%;margin:0;padding:0;"><input type="text" class="form-control" name="snum[]" id="snum" vlaue="" value="" placeholder="每一个规格数量"/></div></div><div class="tu" style="width:3%;float:left;"><img src="/static/images/del.png" alt="" style="width:100%;margin-top:7px;" onclick="delect(this,0)"></div><hr/  style="clear:both;width:85%;margin-left:0;"></div><input type="hidden" name="sid[]" value="0"/>').html();
				$('#container').append(html);
				//div.append(html);
				return false;
			});
		});
	</script>
	<script>
	/* 新闻多图删除 */
	function delall(id, url) {
	    $('#id' + id).hide();
	    var str = $('#pic_oldlist').val();//最原始的完整路径
	    var surl = url + '|';
	    var pic_newold = str.replace(surl, "");
	    $('#pic_oldlist').val(pic_newold);
	}
	$("#fileA").change(function(){
			var objUrl = getObjectURL(this.files[0]) ;
			console.log("objUrl = "+objUrl) ;
			
			if (objUrl) {
			$("#imgA").attr("src", objUrl) ;
			}
		}) ;
		//建立一個可存取到該file的url
		function getObjectURL(file) {
			var url = null ; 
			if (window.createObjectURL!=undefined) { // basic
				url = window.createObjectURL(file) ;
			} else if (window.URL!=undefined) { // mozilla(firefox)
				url = window.URL.createObjectURL(file) ;
			} else if (window.webkitURL!=undefined) { // webkit or chrome
				url = window.webkitURL.createObjectURL(file) ;
			}
			return url ;
		}

		$("#file1").change(function(){
			var objUrl = getObjectURL(this.files[0]) ;
			console.log("objUrl = "+objUrl) ;
			if (objUrl) {
			$("#img1").attr("src", objUrl) ;
			}
		}) ;
		
		//建立一個可存取到該file的url
		function getObjectURL(file) {
			var url = null ; 
			if (window.createObjectURL!=undefined) { // basic
				url = window.createObjectURL(file) ;
			} else if (window.URL!=undefined) { // mozilla(firefox)
				url = window.URL.createObjectURL(file) ;
			} else if (window.webkitURL!=undefined) { // webkit or chrome
				url = window.webkitURL.createObjectURL(file) ;
			}
			return url ;
		}
		$("#file2").change(function(){
			var objUrl = getObjectURL(this.files[0]) ;
			console.log("objUrl = "+objUrl) ;
			if (objUrl) {
			$("#img2").attr("src", objUrl) ;
			}
		}) ;
		//建立一個可存取到該file的url
		function getObjectURL(file) {
			var url = null ; 
			if (window.createObjectURL!=undefined) { // basic
				url = window.createObjectURL(file) ;
			} else if (window.URL!=undefined) { // mozilla(firefox)
				url = window.URL.createObjectURL(file) ;
			} else if (window.webkitURL!=undefined) { // webkit or chrome
				url = window.webkitURL.createObjectURL(file) ;
			}
			return url ;
		}
		function delect(obj,sid){
			if(!confirm('确定删除吗')){
			return false;
		}
		$.ajax({
	        url: "<?php echo url('Goods/delspecs'); ?>",
	        data:{"sid":sid},
	        type: "post",
	        dataType: "json",
	        success: function (mega) {
	          if(mega==1){
	           		obj.parentNode.parentNode.remove();
	           }else{
	           		util.message('修改规格失败', "<?php echo url('Goods/update'); ?>", '');
	           }
	        }
    	});
		}


		$(function(){

			if($("#uploadImage_0").length>0){
			 	
				$("#picArry").hide();
			}
			if($("#uploadImage_0").length<0){
			 	$("#picArry").show();
			}
		})
	</script>
	<script type="text/javascript">

    //实例化编辑器
    //建议使用工厂方法getEditor创建和引用编辑器实例，如果在某个闭包下引用该编辑器，直接调用UE.getEditor('editor')就能拿到相关的实例
    var goodstext=$("#goodstext").val();
    var ue = UE.getEditor('editor');
     ue.ready(function() {
        setContent();
  	 })//编辑器初始化完成再赋值 
   

    function isFocus(e){
        alert(UE.getEditor('editor').isFocus());
        UE.dom.domUtils.preventDefault(e)
    }
    function setblur(e){
        UE.getEditor('editor').blur();
        UE.dom.domUtils.preventDefault(e)
    }
    function insertHtml() {
        var value = prompt('插入html代码', '');
        UE.getEditor('editor').execCommand('insertHtml', value)
    }
    function createEditor() {
        enableBtn();
        UE.getEditor('editor');
    }
    function getAllHtml() {
        alert(UE.getEditor('editor').getAllHtml())
    }
    function getContent() {
        var arr = [];
        arr.push("使用editor.getContent()方法可以获得编辑器的内容");
        arr.push("内容为：");
        arr.push(UE.getEditor('editor').getContent());
        alert(arr.join("\n"));
    }
    function getPlainTxt() {
        var arr = [];
        arr.push("使用editor.getPlainTxt()方法可以获得编辑器的带格式的纯文本内容");
        arr.push("内容为：");
        arr.push(UE.getEditor('editor').getPlainTxt());
        alert(arr.join('\n'))
    }
    function setContent(isAppendTo) {
        var arr = [];
        var goodstext=$("#goodstext").val();
        arr.push(goodstext);
        UE.getEditor('editor').setContent(goodstext);
        //alert(arr.join("\n"));
    }
    function setDisabled() {
        UE.getEditor('editor').setDisabled('fullscreen');
        disableBtn("enable");
    }

    function setEnabled() {
        UE.getEditor('editor').setEnabled();
        enableBtn();
    }

    function getText() {
        //当你点击按钮时编辑区域已经失去了焦点，如果直接用getText将不会得到内容，所以要在选回来，然后取得内容
        var range = UE.getEditor('editor').selection.getRange();
        range.select();
        var txt = UE.getEditor('editor').selection.getText();
        alert(txt)
    }

    function getContentTxt() {
        var arr = [];
        arr.push("使用editor.getContentTxt()方法可以获得编辑器的纯文本内容");
        arr.push("编辑器的纯文本内容为：");
        arr.push(UE.getEditor('editor').getContentTxt());
        alert(arr.join("\n"));
    }
    function hasContent() {
        var arr = [];
        arr.push("使用editor.hasContents()方法判断编辑器里是否有内容");
        arr.push("判断结果为：");
        arr.push(UE.getEditor('editor').hasContents());
        alert(arr.join("\n"));
    }
    function setFocus() {
        UE.getEditor('editor').focus();
    }
    function deleteEditor() {
        disableBtn();
        UE.getEditor('editor').destroy();
    }
    function disableBtn(str) {
        var div = document.getElementById('btns');
        var btns = UE.dom.domUtils.getElementsByTagName(div, "button");
        for (var i = 0, btn; btn = btns[i++];) {
            if (btn.id == str) {
                UE.dom.domUtils.removeAttributes(btn, ["disabled"]);
            } else {
                btn.setAttribute("disabled", "true");
            }
        }
    }
    function enableBtn() {
        var div = document.getElementById('btns');
        var btns = UE.dom.domUtils.getElementsByTagName(div, "button");
        for (var i = 0, btn; btn = btns[i++];) {
            UE.dom.domUtils.removeAttributes(btn, ["disabled"]);
        }
    }

    function getLocalData () {
        alert(UE.getEditor('editor').execCommand( "getlocaldata" ));
    }

    function clearLocalData () {
        UE.getEditor('editor').execCommand( "clearlocaldata" );
        alert("已清空草稿箱")
    }
     $("#news_pic_list").click(function(){
            $("#pic_list").hide();
        });
        $("#news_pic_qqlist").click(function(){
            $("#pic_list").show();
        });
</script>

</div>
</div>
</div>
</div>
</div>
				</div>
			</div>
		</div>
	</div>
	<div class="container-fluid footer text-center" role="footer">
		<div class="friend-link" style="color:#000">
			<a href="http://www.zhongweixintong.com">QQ:553101513&nbsp;&nbsp;联系电话:010-64125951/64125035</a>
		</div>
		<div style="color:#000">
			<a href="http://www.zhongweixintong.com"><b>中微信通</b></a> v1.0.0 &copy; 2014-2017
			<a href="http://www.zhongweixintong.com">www.zhongweixintong.com</a>
		</div>
	</div>
</body>
</html>
